package com.dameng.jianyouquan.jobhunter.activity;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;

import com.dameng.jianyouquan.R;
import com.dameng.jianyouquan.jobhunter.fragment.ChatFragment;
import com.dameng.jianyouquan.jobhunter.fragment.HomeFragment;
import com.dameng.jianyouquan.jobhunter.fragment.Myfragment;
import com.dameng.jianyouquan.jobhunter.fragment.SocialFragment;
import com.next.easynavigation.view.EasyNavigationBar;

import java.util.ArrayList;
import java.util.List;

public class MainJobHunterActivity extends AppCompatActivity {


    private String[] tabText={"首页","聊天","圈子","我的"};
    private int [] normalIcon={R.mipmap.ic_launcher,R.mipmap.ic_launcher,R.mipmap.ic_launcher,R.mipmap.ic_launcher};
    private int [] selectIcon={R.mipmap.ic_launcher_round,R.mipmap.ic_launcher_round,R.mipmap.ic_launcher_round,R.mipmap.ic_launcher_round};
    private List<Fragment> fragments =new ArrayList<>();
    private EasyNavigationBar navigationBar;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        navigationBar = findViewById(R.id.navigationbar);

        fragments.add(new HomeFragment());
        fragments.add(new ChatFragment());
        fragments.add(new SocialFragment());
        fragments.add(new Myfragment());

        navigationBar.titleItems(tabText)
                .normalIconItems(normalIcon)
                .selectIconItems(selectIcon)
                .fragmentList(fragments)
                .smoothScroll(true)
                .canScroll(true)
                .fragmentManager(getSupportFragmentManager())
                .build();

    }


}
